package com.xuecheng.content.test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * @ClassName CustomPublisher
 * @Description TODO
 * @Date 2023/7/16 21:08
 * @Version 1.0
 */
@Component
public class CustomPublisher {
    @Autowired
    private ApplicationContext applicationContext;

    public void publishEvent(CustomEvent customEvent) {
        this.applicationContext.publishEvent(customEvent);
    }
}
